/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sdc.event;

import sdc.net.server.comp.ComponentServer;
import sdc.net.server.comp.ComponentServerManager;
import sdc.strategy.proposal.MeetSlaStrategy;

/**
 *
 * @author yamazaki
 */
public class MeetSlaEvent extends Event {

    public final double t = 50.0;

    public MeetSlaEvent(double eventTime) {
        super(eventTime);
    }

    public void fire() {
        for(ComponentServer server : ComponentServerManager.INSTANCE.getList()) {
            MeetSlaStrategy.method(server);
        }
        EventQueue eq = EventQueue.INSTANCE;
        eq.addEvent(new MeetSlaEvent(eq.getCurrentTime() + t));
    }

}
